package com.liuyi.netty.im.commons.result;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 * @author Mr.Fmy
 * @since 2021-12-08
 */
@Data
@Builder
public class Result<T> implements Serializable {

    private static final long serialVersionUID = 577253894625900747L;

    /**
     * 是否成功
     */
    private boolean success;

    /**
     * 状态码
     */
    private String code;

    /**
     * 提示
     */
    private String msg;

    /**
     * 数据体
     */
    private T data;

    public final static Result<Void> SUCCESS = new ResultBuilder<Void>().success(true).code(ResultCode.SUCCESS).build();
}
